<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="root">
        <div id="query">
        </div>
        <p>
        <div bp-data='{evt:click}'>点击我会上报一条数据</div>
    </div>

    <script>
        BP.page = 'index';
        // 开启白名单
        // BP.whiteList.push('0.0.0.0');
        // BP.send('script');

        var query = document.getElementById('query');

        Query.get(updateInfo);
        setInterval(function () {
            Query.get(updateInfo);
        }, 300000);

        function updateInfo (info) {
            query.innerHTML = '当前共有 ' + info.uv + ' 个人浏览了页面，共浏览了 ' + info.pv + ' 次';
        }
    </script>
</body>
</html>